<template>
  <div class="teacher">
    <div class="avatar">
      <el-avatar :src="settings.avatarUrl + (teacher.url == null ? '2e20dbdbfd504921857aff9c847b6360.gif':teacher.url)" />
      <span>{{ teacher.realName }}</span>
    </div>
    <el-divider />
    <div class="introduce">{{ teacher.introduction }}</div>
  </div>
</template>

<script>
import settings from '@/settings'

export default {
  name: 'TeacherInfo',
  props: {
    teacher: {
      required: true,
      type: Object
    }
  },
  data() {
    return {
      settings
    }
  }
}
</script>

<style lang="scss" scoped>
//右侧教师信息
.teacher {
  width: 260px;
  padding: 25px;
  background-color: #FFF;
  margin-bottom: 20px;

  .avatar {
    display: flex;
    align-items: center;

    span {
      margin: 5px 0 0 20px;
    }
  }

  .introduce {
    color: #999;
    line-height: 18px;
    font-size: 14px;
  }
}
</style>
